perm filename EUCLID.5[0,BGB] blob sn#073906 filedate 1974-02-14 generic text, type T, neo UTF8
COMMENT ⊗   VALID 00002 PAGES 
RECORD PAGE   DESCRIPTION
 00001 00001
 00002 00002	Euclidean Primitives.
 00006 ENDMK
⊗;
Euclidean Primitives.

  1. TRANSLATE(Q,R);	Q argument is a body, face, edge or vertex.
  2. ROTATE(Q,R);	R argument is a transformation array with
  3. DILATE(Q,R);	       respect to world coordinates.
  4. REFLECT(Q,R);

	The four Euclidean transformations are translation, rotation,
reflection  and  dilation; and as first mentioned in Klein's Erlangen
Program, 1872, these four primitives form a group. The primitives may
be  applied  to  bodies,  faces, edges or vertices in order to change
vertex world locii. Thus a body is the set of vertices in its  vertex
ring,  a face is the set of vertices on its perimeter, an edge is the
two vertices which are its ends, and a single vertex is  itself;  but
there  are  special  cases  having  to  do  with faces.  (In GEOMED a
special counter, negative Fcnt, is maintained in wire sweep faces  in
order to make solids of rotation). The second argument R is a pointer
to a transformation array in world coordinates of four rows and three
columns:
			XWC, YWC, ZWC
			IX,  IY,  IZ
			JX,  JY,  JZ
			KX,  KY,  KZ

For translation, only the XWC, YWC and ZWC are involved and  all  the
vertices are translated in the obvious fashion:

	X ← X + XWC;	Y ← Y + YWC;	Z ← Z + ZWC;

Whereas  for  rotation  (dilation  and  reflection)   the   innermost
computation applied to each vertex is:

	X ← X + XWC;	Y ← Y + YWC;	Z ← Z + ZWC;
	XX ← IX*X + IY*Y + IZ*Z;
	YY ← JX*X + JY*Y + JZ*Z;
	ZZ ← KX*X + KY*Y + KZ*Z;
	X ← XX - XWC;	Y ← YY - YWC;	Z ← ZZ - ZWC;

At this point,I should  now  present a  few  general  primitives  for
setting up such transformation arrays, but I don't have them yet. The
problem  involves  selecting  frames  of  references,   strength   of
transformation,  axes of transformations, origins of frames and modes
such  as  absolute,  relative  or  interpolated.  At  present  in  my
applications  these  matters  are  handled  ad  hoc (the most general
solution being the ROTDEL and  EUCLID  subroutines  of  GEOMED).  The
heart  of  deriving  a  transformation  array  is  to  get a frame of
reference REF and an amount of rotation DEL and to compute the matrix
product:
		R ← (transpose(REF)cross(DEL cross REF));

For  dilation (larger or smaller) cross DEL with a non-unity diagonal
matrix; for reflections flip the row signs on desired axes.